﻿namespace Lib.Common;
/// <summary>
/// GUID
/// </summary>
public static class GUID {
    /// <summary>
    /// 获取GUID哈希代码数字
    /// </summary>
    public static int Key {
        get {
            return Guid.NewGuid().GetHashCode();
        }
    }
    /// <summary>
    /// 获取GUID字符串, 格式：“00000000-0000-0000-0000-000000000000”
    /// </summary>
    public static string Value {
        get {
            return Guid.NewGuid().ToString();
        }
    }
    /// <summary>
    /// 获取GUID唯一数字序列
    /// </summary>
    public static long Code {
        get {
            return BitConverter.ToInt64(Guid.NewGuid().ToByteArray(), 0);
        }
    }
}

